package o;

import com.huawei.appmarket.service.keyappupdate.bean.KeyAppDetail;
import java.util.List;

public class ebo {
    private static ebo ˏ = null;
    private cfu ˋ = euc.ˊ().ʽ(KeyAppDetail.TABLE_NAME);

    private ebo() {
    }

    public static synchronized ebo ॱ() {
        ebo o_ebo;
        synchronized (ebo.class) {
            if (ˏ == null) {
                ˏ = new ebo();
            }
            o_ebo = ˏ;
        }
        return o_ebo;
    }

    public List<KeyAppDetail> ˏ(String str, int i) {
        return this.ˋ.ˋ(KeyAppDetail.class, "packageName_=? and versionCode_=?", new String[]{str, String.valueOf(i)}, null, "versionCode_ desc");
    }

    public void ˏ(KeyAppDetail keyAppDetail) {
        if (this.ˋ.ˋ(KeyAppDetail.class, "packageName_=?", new String[]{keyAppDetail.ॱ()}, null, null).isEmpty()) {
            ˋ(keyAppDetail);
        } else {
            ˊ(keyAppDetail);
        }
    }

    public void ˊ(KeyAppDetail keyAppDetail) {
        this.ˋ.ॱ(keyAppDetail, "packageName_=?", new String[]{keyAppDetail.ॱ()});
    }

    public void ˋ(KeyAppDetail keyAppDetail) {
        this.ˋ.ˎ((cfr) keyAppDetail);
    }
}
